<template>
  <div class="detail">      
        <h1>{{title}}</h1>
       <el-row type="flex"  justify="end">           
           <el-col :span="3">
               <a :href="jumplink" target="_blank"><img :src="logo?logo:nopic" alt="登录入口" width="50"></a>
               <p style="text-align:center">登录</p>
            </el-col>
             <el-col :span="2">&nbsp;</el-col>
        </el-row>        
        <el-row class="content"> 
            <el-col :span="24">
                <div v-html="content"></div>  
            </el-col>     
        </el-row>
  </div>
</template>

<script>
export default {
  data(){
      return {        
        title:'',
        desc:'',
        content:'',
        jumplink:'',
        logo:'', 
        nopic:require('../assets/images/blogo.jpg'),        
      }
  },
  methods :{     
      getDate(){
          let detailurl = '/news/detail/id/'+this.$route.params.id         
          this.$fetch( detailurl )
                  .then((response) => {
                  this.title = response.data.title
                   this.title = response.data.title
                  this.logo = response.data.thumb
                  this.jumplink = response.data.jumplink
                  this.content = response.data.content
                   document.title= response.data.title;
                  });
      }, 
  },
  mounted (){
      this.getDate();   
  },
}
</script>

<style scoped>
.detail{    
}
.detail h1{
    font-size:1.5rem;
	font-weight:600;
	text-align:center;
	color:#474747;
	text-decoration:none;
    margin: 50px 0;
}
.detail .content{
    padding: 10px;;
}
</style>
